

#include "spwin32iocp.hpp"
#include "spiocpserver.hpp"
#include "meetinghandler.h"
#include "messageutil.h"

#pragma comment(lib,"ws2_32")
#pragma comment(lib,"mswsock")

//---------------------------------------------------------
using namespace google::protobuf;
int main( int argc, char * argv[] )
{
	int port = 23, maxThreads = 10;

	if( 0 != sp_initsock() ) assert( 0 );

	MeetingManager meetingManager;

	SP_IocpServer server( "", port, new MeetingHandlerFactory( &meetingManager ) );
	server.setTimeout( 600 );
	server.setMaxThreads( maxThreads );
	server.setReqQueueSize( 100, "Sorry, server is busy now!\n" );

	server.runForever();

	sp_closelog();

	return 0;
}

